﻿<phone:PhoneApplicationPage 
    x:Class="Can_I_Drive.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False" d:DesignHeight="800" d:DesignWidth="480" xmlns:my="clr-namespace:System;assembly=mscorlib">
    <phone:PhoneApplicationPage.Resources>
        <my:Boolean x:Key="IsEnabled1">False</my:Boolean>
    </phone:PhoneApplicationPage.Resources>
    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="606*" />
            <RowDefinition Height="194*" />
        </Grid.RowDefinitions>
        <controls:Panorama Title="Can I Drive?" Grid.RowSpan="2" FontSize="20" FontFamily="Segoe WP Light" Foreground="White">
            <controls:Panorama.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF8C014F"/>
                    <GradientStop Color="Black" Offset="0.922"/>
                </LinearGradientBrush>
            </controls:Panorama.Background>

            <!--Panorama item one-->
            <controls:PanoramaItem Header="I tuoi Dati">
                <Grid>
                    <TextBlock Height="68" Margin="0" TextWrapping="Wrap" Text="Inserisci i tuoi dati, poi premi &quot;Calcola&quot; per visualizzare il tuo teorico tasso alcolemico." VerticalAlignment="Top" FontFamily="Segoe WP Light" FontSize="21.333" Foreground="White"/>
                    <TextBlock HorizontalAlignment="Left" Height="29" Margin="22,92,0,0" TextWrapping="Wrap" Text="Di che sesso sei?" VerticalAlignment="Top" Width="158" FontFamily="Segoe WP Light" Foreground="White"/>
                    <RadioButton x:Name="maschio" Content="M" Height="75" Margin="182,70,138,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" GroupName="Sesso" FontSize="29.333" Checked="maschio_Checked" BorderBrush="#BF0C0B0B" Width="100" Background="#FF4263A2" Foreground="White">
                        <RadioButton.RenderTransform>
                            <CompositeTransform ScaleX="0.8" ScaleY="0.8"/>
                        </RadioButton.RenderTransform>
                    </RadioButton>
                    <RadioButton x:Name="femmina" Content="F" Height="75" Margin="0,70,35,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right" Width="100" GroupName="Sesso" FontSize="29.333" Checked="femmina_Checked" FontFamily="Segoe WP Light" Background="#FFB20154" Foreground="White">
                        <RadioButton.RenderTransform>
                            <CompositeTransform ScaleX="0.8" ScaleY="0.8"/>
                        </RadioButton.RenderTransform>
                    </RadioButton>
                    <TextBlock HorizontalAlignment="Left" Height="30" Margin="22,199,0,0" TextWrapping="Wrap" Text="Quanto pesi?" VerticalAlignment="Top" Width="128" FontFamily="Segoe WP Light" Foreground="White"/>
                    <TextBlock HorizontalAlignment="Left" Height="32" Margin="22,254,0,0" TextWrapping="Wrap" Text="Quanto sei alto?" VerticalAlignment="Top" Width="158" FontFamily="Segoe WP Light" Foreground="White"/>
                    <TextBox x:Name="peso" Height="65" Margin="0,182,85,0" TextWrapping="Wrap" Text="Peso" VerticalAlignment="Top" FontSize="21.333" Tap="peso_Tap" InputScope="Number" HorizontalAlignment="Right" Width="116" FontFamily="Segoe WP Light" Foreground="#FF8C014F" TextAlignment="Center" Background="#BEFFFFFF" Style="{StaticResource TextBoxStyle1}"/>
                    <TextBlock HorizontalAlignment="Left" Height="32" Margin="22,143,0,0" TextWrapping="Wrap" Text="Quanti anni hai?" VerticalAlignment="Top" Width="158" FontFamily="Segoe WP Light" Foreground="White"/>
                    <TextBlock HorizontalAlignment="Right" Height="35" Margin="0,199,35,0" TextWrapping="Wrap" Text="kg" VerticalAlignment="Top" Width="46" FontSize="21.333" FontFamily="Segoe WP Light" Foreground="White"/>
                    <TextBlock HorizontalAlignment="Right" Height="32" Margin="0,254,35,0" TextWrapping="Wrap" Text="cm" VerticalAlignment="Top" Width="46" RenderTransformOrigin="-0.022,0.562" FontSize="21.333" FontFamily="Segoe WP Light" Foreground="White"/>
                    <TextBlock Margin="23,302,281,135" TextWrapping="Wrap" Text="Quanto hai mangiato?" Width="116" FontFamily="Segoe WP Light" Foreground="White" />

                    <TextBox x:Name="eta" Height="65" Margin="0,126,85,0" TextWrapping="Wrap" Text="Età" VerticalAlignment="Top" FontSize="21.333" Tap="eta_Tap" InputScope="Number" HorizontalAlignment="Right" Width="116" FontFamily="Segoe WP Light" Foreground="#FF8C014F" TextAlignment="Center" Background="#BEFFFFFF" Style="{StaticResource TextBoxStyle1}"/>
                    <TextBox x:Name="altezza" Height="65" Margin="0,238,85,0" TextWrapping="Wrap" Text="Altezza" VerticalAlignment="Top" FontSize="21.333" Tap="altezza_Tap" InputScope="Number" HorizontalAlignment="Right" Width="116" FontFamily="Segoe WP Light" Foreground="#FF8C014F" TextAlignment="Center" Background="#BEFFFFFF" Style="{StaticResource TextBoxStyle1}"/>
                    <RadioButton x:Name="niente" Content="" Height="75" Margin="182,0,158,129" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" FontSize="29.333" GroupName="Cibo" d:LayoutOverrides="VerticalAlignment" Checked="niente_Checked" Background="#FFBB0100">
                        <RadioButton.RenderTransform>
                            <CompositeTransform ScaleX="0.8" ScaleY="0.8"/>
                        </RadioButton.RenderTransform>
                    </RadioButton>
                    <RadioButton x:Name="poco" Content="" Height="75" Margin="250,0,90,129" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" FontSize="29.333" GroupName="Cibo" d:LayoutOverrides="VerticalAlignment" Checked="poco_Checked" Width="80" BorderThickness="0" BorderBrush="#BFE91414" Background="#FFE07F00">
                        <RadioButton.RenderTransform>
                            <CompositeTransform ScaleX="0.8" ScaleY="0.8"/>
                        </RadioButton.RenderTransform>
                    </RadioButton>
                    <RadioButton x:Name="abbastanza" Content="" Height="75" Margin="0,0,21,129" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" FontSize="29.333" GroupName="Cibo" HorizontalAlignment="Right" Width="80" d:LayoutOverrides="VerticalAlignment" Checked="abbastanza_Checked" Background="#FF03962E">
                        <RadioButton.RenderTransform>
                            <CompositeTransform ScaleX="0.8" ScaleY="0.8"/>
                        </RadioButton.RenderTransform>
                    </RadioButton>
                    <Button Content="" Height="150" HorizontalAlignment="Left" Margin="0,348,0,0" Name="buttonInfo" VerticalAlignment="Top" Width="73" Click="buttonInfo_Click" BorderBrush="{StaticResource TransparentBrush}">
                        <Button.Background>
                            <ImageBrush ImageSource="/Can%20I%20Drive;component/img/icona-info.png" Stretch="None" />
                        </Button.Background>
                    </Button>
                    <Button Content="" Height="150" HorizontalAlignment="Right" Margin="0,348,272,0" Name="buttonRic" VerticalAlignment="Top" Width="73" Click="buttonRic_Click" UseLayoutRounding="False" Visibility="Visible" BorderBrush="{StaticResource TransparentBrush}">
                        <Button.Background>
                            <ImageBrush ImageSource="/Can%20I%20Drive;component/img/icona-riconoscimenti.png" Stretch="None" />
                        </Button.Background>
                    </Button>
                    <Button x:Name="calcola" Content="" Height="89" Margin="154,0,8,8" VerticalAlignment="Bottom" FontSize="21.333" Click="calcola_Click" BorderBrush="{StaticResource TransparentBrush}">
                        <Button.Background>
                            <ImageBrush ImageSource="/Can%20I%20Drive;component/img/icona-calcola.png" Stretch="None" />
                        </Button.Background>
                    </Button>
                    <TextBlock Height="38" Margin="185,0,182,112" TextWrapping="Wrap" Text="Poco" VerticalAlignment="Bottom" FontSize="21.333" TextAlignment="Center" Foreground="White"/>
                    <TextBlock Height="38" Margin="0,0,107,112" TextWrapping="Wrap" Text="Medio" VerticalAlignment="Bottom" FontSize="21.333" TextAlignment="Center" HorizontalAlignment="Right" Width="65" Foreground="White"/>
                    <TextBlock Height="38" Margin="0,0,38,112" TextWrapping="Wrap" Text="Tanto" VerticalAlignment="Bottom" FontSize="21.333" TextAlignment="Center" HorizontalAlignment="Right" Width="65" Foreground="White"/>

                </Grid>


            </controls:PanoramaItem>

            <!--Panorama item two-->
            <controls:PanoramaItem Header="Bevande">
                <Grid>
                    <ListBox Height="277" HorizontalAlignment="Left" Margin="3,81,0,0" Name="listBox1" VerticalAlignment="Top" Width="411" SelectionChanged="listBox1_SelectionChanged" FontSize="21.333" Foreground="White"/>
                    <Button Content="" Height="145" HorizontalAlignment="Right" Margin="0,353,-1,0" Name="ButtonPiu" VerticalAlignment="Top" Width="70" Click="ButtonPiu_Click" BorderBrush="{StaticResource TransparentBrush}" IsEnabled="True" BorderThickness="0" Visibility="Visible">
                        <Button.Background>
                            <ImageBrush ImageSource="/Can%20I%20Drive;component/img/icona-piu.png" Stretch="None" />
                        </Button.Background>
                    </Button>
                    <Button Content="" Height="145" HorizontalAlignment="Left" Margin="207,353,0,0" Name="ButtonMeno" VerticalAlignment="Top" Width="70" Click="ButtonMeno_Click" AllowDrop="False" HorizontalContentAlignment="Center" BorderBrush="{StaticResource TransparentBrush}" BorderThickness="0">
                        <Button.Background>
                            <ImageBrush ImageSource="/Can%20I%20Drive;component/img/icona-meno.png" Stretch="None" />
                        </Button.Background>
                    </Button>
                    <TextBox Height="69" HorizontalAlignment="Left" Margin="278,371,0,0" Name="textBox1" VerticalAlignment="Top" Width="69" TextChanged="textBox1_TextChanged" IsReadOnly="True" TextAlignment="Center" Text="0" Style="{StaticResource TextBoxStyle1}" />
                    <Button Content="" Height="70" HorizontalAlignment="Left" Margin="268,428,0,0" Name="ButtonOK" VerticalAlignment="Top" Width="91" Click="ButtonOK_Click" BorderBrush="{StaticResource TransparentBrush}" BorderThickness="0">
                        <Button.Background>
                            <ImageBrush ImageSource="/Can%20I%20Drive;component/img/icona-ok.png" Stretch="None" />
                        </Button.Background>
                    </Button>
                    <TextBlock Height="68" Margin="0" Text="Clicca una bevanda e seleziona la quantità, dopodichè premi ok per inserirla nella lista." TextWrapping="Wrap" VerticalAlignment="Top" FontSize="21.333" FontFamily="Segoe WP Light" Foreground="White" />
                </Grid>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>
    <!--Panorama-based applications should not show an ApplicationBar-->

</phone:PhoneApplicationPage>